home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 37.0 KB | 935 lines | [TEXT/MPS ] |
- ;
- ; File: Gestalt.a
- ;
- ; Contains: Gestalt Interfaces.
- ;
- ; Version: Technology: System 7.5
- ; Release: Universal Interfaces 3.0d3 on Copland DR1
- ;
- ; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
- IF &TYPE('__GESTALT__') = 'UNDEFINED' THEN
- __GESTALT__ SET 1
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
- include 'MixedMode.a'
- ENDIF
- IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
- ENDIF
- IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
- ;
- ; pascal OSErr Gestalt(OSType selector, long *response)
- ;
- IF ¬ GENERATINGCFM THEN
- _Gestalt: OPWORD $A1AD
- ELSE
- IMPORT_CFM_FUNCTION Gestalt
- ENDIF
-
- ENDIF
- IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
- ;
- ; pascal OSErr ReplaceGestalt(OSType selector, SelectorFunctionUPP gestaltFunction, SelectorFunctionUPP *oldGestaltFunction)
- ;
- IF ¬ GENERATINGCFM THEN
- _ReplaceGestalt: OPWORD $A5AD
- ELSE
- IMPORT_CFM_FUNCTION ReplaceGestalt
- ENDIF
-
- ENDIF
- IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
- ;
- ; pascal OSErr NewGestalt(OSType selector, SelectorFunctionUPP gestaltFunction)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; selector => D0
- ; gestaltFunction => A0
- ; returns:
- ; OSErr <= D0
- _NewGestalt: OPWORD $A3AD
- ELSE
- IMPORT_CFM_FUNCTION NewGestalt
- ENDIF
-
- ENDIF
- IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
- ; These functions are built into System 7.5, but not on earlier systems
- ;
- ; pascal OSErr NewGestaltValue(OSType selector, long newValue)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _NewGestaltValue
- move.w #$0401,D0
- dc.w $ABF1
- EndM
- ELSE
- IMPORT_CFM_FUNCTION NewGestaltValue
- ENDIF
-
- ;
- ; pascal OSErr ReplaceGestaltValue(OSType selector, long replacementValue)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _ReplaceGestaltValue
- move.w #$0402,D0
- dc.w $ABF1
- EndM
- ELSE
- IMPORT_CFM_FUNCTION ReplaceGestaltValue
- ENDIF
-
- ;
- ; pascal OSErr SetGestaltValue(OSType selector, long newValue)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SetGestaltValue
- move.w #$0404,D0
- dc.w $ABF1
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetGestaltValue
- ENDIF
-
- ENDIF
- IF FOR_SYSTEM8_COOPERATIVE THEN
-
-
- ENDIF
- IF FOR_SYSTEM8_COOPERATIVE THEN
- ;
- ; extern OSStatus CreateGestaltIterator(GestaltIteratorRef *theIterator)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION CreateGestaltIterator
- ENDIF
-
- ;
- ; extern OSStatus DisposeGestaltIterator(GestaltIteratorRef theIterator)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION DisposeGestaltIterator
- ENDIF
-
- ;
- ; extern OSStatus GetNextGestaltSelectors(GestaltIteratorRef theIterator, UInt32 numberToGet, OSType *gestaltSelectors, UInt32 *numberGotten)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION GetNextGestaltSelectors
- ENDIF
-
- ;
- ; extern OSErr DeleteGestalt(OSType selector)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION DeleteGestalt
- ENDIF
-
- ENDIF
- IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
- ;
- ; pascal OSErr DeleteGestaltValue(OSType selector)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _DeleteGestaltValue
- move.w #$0203,D0
- dc.w $ABF1
- EndM
- ELSE
- IMPORT_CFM_FUNCTION DeleteGestaltValue
- ENDIF
-
- ENDIF
- IF ¬ OLDROUTINELOCATIONS THEN
- ; Environs Equates
-
- curSysEnvVers EQU 2 ; Updated to equal latest SysEnvirons version
- SysEnvRec RECORD 0
- environsVersion ds.w 1 ; offset: $0 (0)
- machineType ds.w 1 ; offset: $2 (2)
- systemVersion ds.w 1 ; offset: $4 (4)
- processor ds.w 1 ; offset: $6 (6)
- hasFPU ds.b 1 ; offset: $8 (8)
- hasColorQD ds.b 1 ; offset: $9 (9)
- keyBoardType ds.w 1 ; offset: $A (10)
- atDrvrVersNum ds.w 1 ; offset: $C (12)
- sysVRefNum ds.w 1 ; offset: $E (14)
- sizeof EQU * ; size: $10 (16)
- ENDR
- IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
- ;
- ; pascal OSErr SysEnvirons(short versionRequested, SysEnvRec *theWorld)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; versionRequetheWorld=> D0
- ; theWorld => A0
- ; returns:
- ; OSErr <= D0
- _SysEnvirons: OPWORD $A090
- ELSE
- IMPORT_CFM_FUNCTION SysEnvirons
- ENDIF
-
- ENDIF
- ENDIF
- ; Environment Selectors
-
- gestaltAddressingModeAttr EQU 'addr' ; addressing mode attributes
- gestalt32BitAddressing EQU 0 ; using 32-bit addressing mode
- gestalt32BitSysZone EQU 1 ; 32-bit compatible system zone
- gestalt32BitCapable EQU 2 ; Machine is 32-bit capable
-
- gestaltAliasMgrAttr EQU 'alis' ; Alias Mgr Attributes
- gestaltAliasMgrPresent EQU 0 ; True if the Alias Mgr is present
- gestaltAliasMgrSupportsRemoteAppletalk EQU 1 ; True if the Alias Mgr knows about Remote Appletalk
- gestaltAliasMgrSupportsAOCEKeychain EQU 2 ; True if the Alias Mgr knows about the AOCE Keychain
-
- gestaltATAAttr EQU 'ata ' ; ATA is the driver to support IDE hard disks
- gestaltATAPresent EQU 0 ; if set, ATA Manager is present
-
- gestaltAppleTalkVersion EQU 'atlk' ; appletalk version
- ;
- ; FORMAT OF gestaltATalkVersion RESPONSE
- ; --------------------------------------
- ; The version is stored in the high three bytes of the response value. Let us number
- ; the bytes in the response value from 0 to 3, where 0 is the least-significant byte.
- ;
- ; Byte#: 3 2 1 0
- ; Value: 0xMMNNRR00
- ;
- ; Byte 3 (MM) contains the major revision number, byte 2 (NN) contains the minor
- ; revision number, and byte 1 (RR) contains a constant that represents the release
- ; stage. Byte 0 always contains 0x00. The constants for the release stages are:
- ;
- ; development = 0x20
- ; alpha = 0x40
- ; beta = 0x60
- ; final = 0x80
- ; release = 0x80
- ;
- ; For example, if you call Gestalt with the 'atkv' selector when AppleTalk version 57
- ; is loaded, you receive the long integer response value 0x39008000.
- ;
-
- gestaltATalkVersion EQU 'atkv' ; Detailed AppleTalk version; see comment above for format
-
- gestaltAUXVersion EQU 'a/ux' ; a/ux version, if present
-
- gestaltBusClkSpeed EQU 'bclk' ; main I/O bus clock speed in hertz
-
- gestaltCloseViewAttr EQU 'BSDa' ; CloseView attributes
- gestaltCloseViewEnabled EQU 0 ; Closeview enabled (dynamic bit - returns current state)
- gestaltCloseViewDisplayMgrFriendly EQU 1 ; Closeview compatible with Display Manager (FUTURE)
-
- gestaltCFMAttr EQU 'cfrg' ; returns information about the Code Fragment Manager
- gestaltCFMPresent EQU 0 ; true if the Code Fragment Manager is present
-
- gestaltCollectionMgrVersion EQU 'cltn' ; Collection Manager version
-
- gestaltColorMatchingAttr EQU 'cmta' ; ColorSync attributes
- gestaltHighLevelMatching EQU 0
- gestaltColorMatchingLibLoaded EQU 1
-
- gestaltColorMatchingVersion EQU 'cmtc'
- gestaltColorSync10 EQU $0100 ; 0x0100 & 0x0110 _Gestalt versions for 1.0-1.0.3 product
- gestaltColorSync11 EQU $0110 ; 0x0100 == low-level matching only
- gestaltColorSync104 EQU $0104 ; Real version, by popular demand
- gestaltColorSync105 EQU $0105
- gestaltColorSync20 EQU $0200 ; ColorSync 2.0
-
- gestaltConnMgrAttr EQU 'conn' ; connection mgr attributes
- gestaltConnMgrPresent EQU 0
- gestaltConnMgrCMSearchFix EQU 1 ; Fix to CMAddSearch?
- gestaltConnMgrErrorString EQU 2 ; has CMGetErrorString()
- gestaltConnMgrMultiAsyncIO EQU 3 ; CMNewIOPB, CMDisposeIOPB, CMPBRead, CMPBWrite, CMPBIOKill
-
- gestaltComponentMgr EQU 'cpnt' ; Component Mgr version
-
- gestaltColorPickerVersion EQU 'cpkr' ; returns version of ColorPicker
- gestaltColorPicker EQU 'cpkr' ; gestaltColorPicker is old name for gestaltColorPickerVersion
- ;
- ; The gestaltNativeCPUtype ('cput') selector can be used to determine the
- ; native CPU type for all Macs running System 7.5 or later.
- ;
- ; The 'cput' selector is not available when running System 7.0 (or earlier)
- ; on most 68K machines. If 'cput' is not available, then the 'proc' selector
- ; should be used to determine the processor type.
- ;
- ; An application should always try the 'cput' selector first. This is because,
- ; on PowerPC machines, the 'proc' selector will reflect the CPU type of the
- ; emulator's "virtual processor" rather than the native CPU type.
- ;
- ; The values specified below are accurate. Prior versions of the Gestalt
- ; interface file contained values that were off by one.
- ;
- ; The Quadra 840AV and the Quadra 660AV contain a bug in the ROM code that
- ; causes the 'cput' selector to respond with the value 5. This behavior
- ; occurs only when running System 7.1. System 7.5 fixes the bug by replacing
- ; the faulty 'cput' selector function with the correct one.
- ;
-
- gestaltNativeCPUtype EQU 'cput' ; Native CPU type
- gestaltCPU68000 EQU 0 ; Various 68k CPUs...
- gestaltCPU68010 EQU 1
- gestaltCPU68020 EQU 2
- gestaltCPU68030 EQU 3
- gestaltCPU68040 EQU 4
- gestaltCPU601 EQU $0101 ; IBM 601
- gestaltCPU603 EQU $0103
- gestaltCPU604 EQU $0104
- gestaltCPU603e EQU $0106
-
- gestaltCRMAttr EQU 'crm ' ; comm resource mgr attributes
- gestaltCRMPresent EQU 0
- gestaltCRMPersistentFix EQU 1 ; fix for persistent tools
- gestaltCRMToolRsrcCalls EQU 2 ; has CRMGetToolResource/ReleaseToolResource
-
- gestaltControlStripVersion EQU 'csvr' ; Control Strip version (was 'sdvr')
-
- gestaltCTBVersion EQU 'ctbv' ; CommToolbox version
-
- gestaltDBAccessMgrAttr EQU 'dbac' ; Database Access Mgr attributes
- gestaltDBAccessMgrPresent EQU 0 ; True if Database Access Mgr present
-
- gestaltDictionaryMgrAttr EQU 'dict' ; Dictionary Manager attributes
- gestaltDictionaryMgrPresent EQU 0 ; Dictionary Manager attributes
-
- gestaltDITLExtAttr EQU 'ditl' ; AppenDITL, etc. calls from CTB
- gestaltDITLExtPresent EQU 0 ; True if calls are present
-
- gestaltDisplayMgrAttr EQU 'dply' ; Display Manager attributes
- gestaltDisplayMgrPresent EQU 0 ; True if Display Mgr is present
- gestaltDisplayMgrCanSwitchMirrored EQU 2 ; True if Display Mgr can switch modes on mirrored displays
- gestaltDisplayMgrSetDepthNotifies EQU 3 ; True SetDepth generates displays mgr notification
-
- gestaltDisplayMgrVers EQU 'dplv' ; Display Manager version
-
- gestaltDragMgrAttr EQU 'drag' ; Drag Manager attributes
- gestaltDragMgrPresent EQU 0 ; Drag Manager is present
- gestaltDragMgrFloatingWind EQU 1 ; Drag Manager supports floating windows
- gestaltPPCDragLibPresent EQU 2 ; Drag Manager PPC DragLib is present
- gestaltDragMgrHasImageSupport EQU 3 ; Drag Manager allows SetDragImage call
-
- gestaltEasyAccessAttr EQU 'easy' ; Easy Access attributes
- gestaltEasyAccessOff EQU 0 ; if Easy Access present, but off (no icon)
- gestaltEasyAccessOn EQU 1 ; if Easy Access "On"
- gestaltEasyAccessSticky EQU 2 ; if Easy Access "Sticky"
- gestaltEasyAccessLocked EQU 3 ; if Easy Access "Locked"
-
- gestaltEditionMgrAttr EQU 'edtn' ; Edition Mgr attributes
- gestaltEditionMgrPresent EQU 0 ; True if Edition Mgr present
- gestaltEditionMgrTranslationAware EQU 1 ; True if edition manager is translation manager aware
-
- gestaltAppleEventsAttr EQU 'evnt' ; Apple Events attributes
- gestaltAppleEventsPresent EQU 0 ; True if Apple Events present
- gestaltScriptingSupport EQU 1
- gestaltOSLInSystem EQU 2 ; OSL is in system so don’t use the one linked in to app
-
- gestaltFinderAttr EQU 'fndr' ; Finder attributes
- gestaltFinderDropEvent EQU 0 ; Finder recognizes drop event
- gestaltFinderMagicPlacement EQU 1 ; Finder supports magic icon placement
- gestaltFinderCallsAEProcess EQU 2 ; Finder calls AEProcessAppleEvent
- gestaltOSLCompliantFinder EQU 3 ; Finder is scriptable and recordable
- gestaltFinderSupports4GBVolumes EQU 4 ; Finder correctly handles 4GB volumes
- gestaltFinderHasClippings EQU 6 ; Finder supports Drag Manager clipping files
-
- gestaltFindFolderAttr EQU 'fold' ; Folder Mgr attributes
- gestaltFindFolderPresent EQU 0 ; True if Folder Mgr present
-
- gestaltFontMgrAttr EQU 'font' ; Font Mgr attributes
- gestaltOutlineFonts EQU 0 ; True if Outline Fonts supported
-
- gestaltFPUType EQU 'fpu ' ; fpu type
- gestaltNoFPU EQU 0 ; no FPU
- gestalt68881 EQU 1 ; 68881 FPU
- gestalt68882 EQU 2 ; 68882 FPU
- gestalt68040FPU EQU 3 ; 68040 built-in FPU
-
- gestaltFSAttr EQU 'fs ' ; file system attributes
- gestaltFullExtFSDispatching EQU 0 ; has really cool new HFSDispatch dispatcher
- gestaltHasFSSpecCalls EQU 1 ; has FSSpec calls
- gestaltHasFileSystemManager EQU 2 ; has a file system manager
- gestaltFSMDoesDynamicLoad EQU 3 ; file system manager supports dynamic loading
- gestaltFSSupports4GBVols EQU 4 ; file system supports 4 gigabyte volumes
- gestaltFSSupports2TBVols EQU 5 ; file system supports 2 terabyte volumes
- gestaltHasExtendedDiskInit EQU 6 ; has extended Disk Initialization calls
- IF ¬ OLDROUTINELOCATIONS THEN
-
- gestaltFSMVersion EQU 'fsm '
- ENDIF
-
- gestaltFXfrMgrAttr EQU 'fxfr' ; file transfer manager attributes
- gestaltFXfrMgrPresent EQU 0
- gestaltFXfrMgrMultiFile EQU 1 ; supports FTSend and FTReceive
- gestaltFXfrMgrErrorString EQU 2 ; supports FTGetErrorString
- gestaltFXfrMgrAsync EQU 3 ;supports FTSendAsync, FTReceiveAsync, FTCompletionAsync
-
- gestaltGraphicsAttr EQU 'gfxa' ; Quickdraw GX attributes selector
- gestaltGraphicsIsDebugging EQU $00000001
- gestaltGraphicsIsLoaded EQU $00000002
- gestaltGraphicsIsPowerPC EQU $00000004
-
- gestaltGraphicsVersion EQU 'grfx' ; Quickdraw GX version selector
- gestaltCurrentGraphicsVersion EQU $00010200 ; the version described in this set of headers
-
- gestaltHardwareAttr EQU 'hdwr' ; hardware attributes
- gestaltHasVIA1 EQU 0 ; VIA1 exists
- gestaltHasVIA2 EQU 1 ; VIA2 exists
- gestaltHasASC EQU 3 ; Apple Sound Chip exists
- gestaltHasSCC EQU 4 ; SCC exists
- gestaltHasSCSI EQU 7 ; SCSI exists
- gestaltHasSoftPowerOff EQU 19 ; Capable of software power off
- gestaltHasSCSI961 EQU 21 ; 53C96 SCSI controller on internal bus
- gestaltHasSCSI962 EQU 22 ; 53C96 SCSI controller on external bus
- gestaltHasUniversalROM EQU 24 ; Do we have a Universal ROM?
- gestaltHasEnhancedLtalk EQU 30 ; Do we have Enhanced LocalTalk?
-
- gestaltHelpMgrAttr EQU 'help' ; Help Mgr Attributes
- gestaltHelpMgrPresent EQU 0 ; true if help mgr is present
- gestaltHelpMgrExtensions EQU 1 ; true if help mgr extensions are installed
- gestaltAppleGuideIsDebug EQU 30
- gestaltAppleGuidePresent EQU 31 ; true if AppleGuide is installed
-
- gestaltHardwareVendorCode EQU 'hrad' ; Returns hardware vendor information
- gestaltHardwareVendorApple EQU 'Appl' ; Hardware built by Apple
-
- gestaltCompressionMgr EQU 'icmp' ; returns version of the Image Compression Manager
-
- gestaltIconUtilitiesAttr EQU 'icon' ; Icon Utilities attributes (Note: available in System 7.0, despite gestalt)
- gestaltIconUtilitiesPresent EQU 0 ; true if icon utilities are present
- ;
- ; To obtain information about the connected keyboard(s), one should
- ; use the ADB Manager API. See Technical Note OV16 for details.
- ;
-
- gestaltKeyboardType EQU 'kbd ' ; keyboard type
- gestaltMacKbd EQU 1
- gestaltMacAndPad EQU 2
- gestaltMacPlusKbd EQU 3
- gestaltExtADBKbd EQU 4
- gestaltStdADBKbd EQU 5
- gestaltPrtblADBKbd EQU 6
- gestaltPrtblISOKbd EQU 7
- gestaltStdISOADBKbd EQU 8
- gestaltExtISOADBKbd EQU 9
- gestaltADBKbdII EQU 10
- gestaltADBISOKbdII EQU 11
- gestaltPwrBookADBKbd EQU 12
- gestaltPwrBookISOADBKbd EQU 13
- gestaltAppleAdjustKeypad EQU 14
- gestaltAppleAdjustADBKbd EQU 15
- gestaltAppleAdjustISOKbd EQU 16
- gestaltJapanAdjustADBKbd EQU 17 ; Japan Adjustable Keyboard
- gestaltPwrBkExtISOKbd EQU 20 ; PowerBook Extended International Keyboard with function keys
- gestaltPwrBkExtJISKbd EQU 21 ; PowerBook Extended Japanese Keyboard with function keys
- gestaltPwrBkExtADBKbd EQU 24 ; PowerBook Extended Domestic Keyboard with function keys
-
- gestaltLowMemorySize EQU 'lmem' ; size of low memory area
-
- gestaltLogicalRAMSize EQU 'lram' ; logical ram size
- ;
- ; MACHINE TYPE CONSTANTS NAMING CONVENTION
- ;
- ; All future machine type constant names take the following form:
- ;
- ; gestalt<lineName><modelNumber>
- ;
- ; Line Names
- ;
- ; The following table contains the lines currently produced by Apple and the
- ; lineName substrings associated with them:
- ;
- ; Line lineName
- ; ------------------------- ------------
- ; Macintosh LC "MacLC"
- ; Macintosh Performa "Performa"
- ; Macintosh PowerBook "PowerBook"
- ; Macintosh PowerBook Duo "PowerBookDuo"
- ; Power Macintosh "PowerMac"
- ; Apple Workgroup Server "AWS"
- ;
- ; The following table contains lineNames for some discontinued lines:
- ;
- ; Line lineName
- ; ------------------------- ------------
- ; Macintosh Quadra "MacQuadra" (preferred)
- ; "Quadra" (also used, but not preferred)
- ; Macintosh Centris "MacCentris"
- ;
- ; Model Numbers
- ;
- ; The modelNumber is a string representing the specific model of the machine
- ; within its particular line. For example, for the Power Macintosh 8100/80,
- ; the modelNumber is "8100".
- ;
- ; Some Performa & LC model numbers contain variations in the rightmost 1 or 2
- ; digits to indicate different RAM and Hard Disk configurations. A single
- ; machine type is assigned for all variations of a specific model number. In
- ; this case, the modelNumber string consists of the constant leftmost part
- ; of the model number with 0s for the variant digits. For example, the
- ; Performa 6115 and Performa 6116 are both return the same machine type
- ; constant: gestaltPerforma6100.
- ;
- ;
- ; OLD NAMING CONVENTIONS
- ;
- ; The "Underscore Speed" suffix
- ;
- ; In the past, Apple differentiated between machines that had the same model
- ; number but different speeds. For example, the Power Macintosh 8100/80 and
- ; Power Macintosh 8100/100 return different machine type constants. This is
- ; why some existing machine type constant names take the form:
- ;
- ; gestalt<lineName><modelNumber>_<speed>
- ;
- ; e.g.
- ;
- ; gestaltPowerMac8100_110
- ; gestaltPowerMac7100_80
- ; gestaltPowerMac7100_66
- ;
- ; It is no longer necessary to use the "underscore speed" suffix. Starting with
- ; the Power Surge machines (Power Macintosh 7200, 7500, 8500 and 9500), speed is
- ; no longer used to differentiate between machine types. This is why a Power
- ; Macintosh 7200/75 and a Power Macintosh 7200/90 return the same machine type
- ; constant: gestaltPowerMac7200.
- ;
- ; The "Screen Type" suffix
- ;
- ; All PowerBook models prior to the PowerBook 190, and all PowerBook Duo models
- ; before the PowerBook Duo 2300 take the form:
- ;
- ; gestalt<lineName><modelNumber><screenType>
- ;
- ; Where <screenType> is "c" or the empty string.
- ;
- ; e.g.
- ;
- ; gestaltPowerBook100
- ; gestaltPowerBookDuo280
- ; gestaltPowerBookDuo280c
- ; gestaltPowerBook180
- ; gestaltPowerBook180c
- ;
- ; Starting with the PowerBook 190 series and the PowerBook Duo 2300 series, machine
- ; types are no longer differentiated based on screen type. This is why a PowerBook
- ; 5300cs/100 and a PowerBook 5300c/100 both return the same machine type constant:
- ; gestaltPowerBook5300.
- ;
- ; Macintosh LC 630 gestaltMacLC630
- ; Macintosh Performa 6200 gestaltPerforma6200
- ; Macintosh Quadra 700 gestaltQuadra700
- ; Macintosh PowerBook 5300 gestaltPowerBook5300
- ; Macintosh PowerBook Duo 2300 gestaltPowerBookDuo2300
- ; Power Macintosh 8500 gestaltPowerMac8500
- ;
-
- gestaltMachineType EQU 'mach' ; machine type
- gestaltClassic EQU 1
- gestaltMacXL EQU 2
- gestaltMac512KE EQU 3
- gestaltMacPlus EQU 4
- gestaltMacSE EQU 5
- gestaltMacII EQU 6
- gestaltMacIIx EQU 7
- gestaltMacIIcx EQU 8
- gestaltMacSE030 EQU 9
- gestaltPortable EQU 10
- gestaltMacIIci EQU 11
- gestaltMacIIfx EQU 13
- gestaltMacClassic EQU 17
- gestaltMacIIsi EQU 18
- gestaltMacLC EQU 19
- gestaltQuadra900 EQU 20
- gestaltPowerBook170 EQU 21
- gestaltQuadra700 EQU 22
- gestaltClassicII EQU 23
- gestaltPowerBook100 EQU 24
- gestaltPowerBook140 EQU 25
- gestaltQuadra950 EQU 26
- gestaltMacLCIII EQU 27
- gestaltPerforma450 EQU 27
- gestaltPowerBookDuo210 EQU 29
- gestaltMacCentris650 EQU 30
- gestaltPowerBookDuo230 EQU 32
- gestaltPowerBook180 EQU 33
- gestaltPowerBook160 EQU 34
- gestaltMacQuadra800 EQU 35
- gestaltMacQuadra650 EQU 36
- gestaltMacLCII EQU 37
- gestaltPowerBookDuo250 EQU 38
- gestaltAWS9150_80 EQU 39
- gestaltPowerMac8100_110 EQU 40
- gestaltAWS8150_110 EQU 40
- gestaltPowerMac5200 EQU 41
- gestaltPowerMac6200 EQU 42
- gestaltMacIIvi EQU 44
- gestaltMacIIvm EQU 45
- gestaltPerforma600 EQU 45
- gestaltPowerMac7100_80 EQU 47
- gestaltMacIIvx EQU 48
- gestaltMacColorClassic EQU 49
- gestaltPerforma250 EQU 49
- gestaltPowerBook165c EQU 50
- gestaltMacCentris610 EQU 52
- gestaltMacQuadra610 EQU 53
- gestaltPowerBook145 EQU 54
- gestaltPowerMac8100_100 EQU 55
- gestaltMacLC520 EQU 56
- gestaltAWS9150_120 EQU 57
- gestaltMacCentris660AV EQU 60
- gestaltPerforma46x EQU 62
- gestaltPowerMac8100_80 EQU 65
- gestaltAWS8150_80 EQU 65
- gestaltPowerMac9500 EQU 67
- gestaltPowerMac7500 EQU 68
- gestaltPowerMac8500 EQU 69
- gestaltPowerBook180c EQU 71
- gestaltPowerBook520 EQU 72
- gestaltPowerBook520c EQU 72
- gestaltPowerBook540 EQU 72
- gestaltPowerBook540c EQU 72
- gestaltPowerMac6100_60 EQU 75
- gestaltAWS6150_60 EQU 75
- gestaltPowerBookDuo270c EQU 77
- gestaltMacQuadra840AV EQU 78
- gestaltPerforma550 EQU 80
- gestaltPowerBook165 EQU 84
- gestaltPowerBook190 EQU 85
- gestaltMacTV EQU 88
- gestaltMacLC475 EQU 89
- gestaltPerforma47x EQU 89
- gestaltMacLC575 EQU 92
- gestaltMacQuadra605 EQU 94
- gestaltQuadra630 EQU 98
- gestaltPowerMac6100_66 EQU 100
- gestaltAWS6150_66 EQU 100
- gestaltPowerBookDuo280 EQU 102
- gestaltPowerBookDuo280c EQU 103
- gestaltPowerMac7200 EQU 108
- gestaltPowerMac7100_66 EQU 112 ; Power Macintosh 7100/66
- gestaltPowerBook150 EQU 115
- gestaltPowerBookDuo2300 EQU 124
- gestaltPowerBook500PPCUpgrade EQU 126
- gestaltPowerBook5300 EQU 128
-
- kMachineNameStrID EQU -16395
-
- gestaltMachineIcon EQU 'micn' ; machine icon
-
- gestaltMiscAttr EQU 'misc' ; miscellaneous attributes
- gestaltScrollingThrottle EQU 0 ; true if scrolling throttle on
- gestaltSquareMenuBar EQU 2 ; true if menu bar is square
- ;
- ; The name gestaltMixedModeVersion for the 'mixd' selector is semantically incorrect.
- ; The same selector has been renamed gestaltMixedModeAttr to properly reflect the
- ; Inside Mac: PowerPC System Software documentation. The gestaltMixedModeVersion
- ; symbol has been preserved only for backwards compatibility.
- ;
- ; Developers are forewarned that gestaltMixedModeVersion has a limited lifespan and
- ; will be removed in a future release of the Interfaces.
- ;
- ; For the first version of Mixed Mode, both meanings of the 'mixd' selector are
- ; functionally identical. They both return 0x00000001. In subsequent versions
- ; of Mixed Mode, however, the 'mixd' selector will not respond with an increasing
- ; version number, but rather, with 32 attribute bits with various meanings.
- ;
-
- gestaltMixedModeVersion EQU 'mixd' ; returns version of Mixed Mode
-
- gestaltMixedModeAttr EQU 'mixd' ; returns Mixed Mode attributes
- gestaltMixedModePowerPC EQU 0 ; true if Mixed Mode supports PowerPC ABI calling conventions
- gestaltPowerPCAware EQU 0 ; old name for gestaltMixedModePowerPC
- gestaltMixedModeCFM68K EQU 1 ; true if Mixed Mode supports CFM-68K calling conventions
- gestaltMixedModeCFM68KHasTrap EQU 2 ; true if CFM-68K Mixed Mode implements _MixedModeDispatch (versions 1.0.1 and prior did not)
-
- gestaltMMUType EQU 'mmu ' ; mmu type
- gestaltNoMMU EQU 0 ; no MMU
- gestaltAMU EQU 1 ; address management unit
- gestalt68851 EQU 2 ; 68851 PMMU
- gestalt68030MMU EQU 3 ; 68030 built-in MMU
- gestalt68040MMU EQU 4 ; 68040 built-in MMU
- gestaltEMMU1 EQU 5 ; Emulated MMU type 1
-
- gestaltStdNBPAttr EQU 'nlup' ; standard nbp attributes
- gestaltStdNBPPresent EQU 0
- gestaltStdNBPSupportsAutoPosition EQU 1 ; StandardNBP takes (-1,-1) to mean alert position main screen
-
- gestaltNotificationMgrAttr EQU 'nmgr' ; notification manager attributes
- gestaltNotificationPresent EQU 0 ; notification manager exists
-
- gestaltNameRegistryVersion EQU 'nreg' ; NameRegistryLib version number
-
- gestaltNuBusSlotCount EQU 'nubs' ; count of logical NuBus slots present
-
- gestaltOpenFirmwareInfo EQU 'opfw' ; Open Firmware info
-
- gestaltOSAttr EQU 'os ' ; o/s attributes
- gestaltSysZoneGrowable EQU 0 ; system heap is growable
- gestaltLaunchCanReturn EQU 1 ; can return from launch
- gestaltLaunchFullFileSpec EQU 2 ; can launch from full file spec
- gestaltLaunchControl EQU 3 ; launch control support available
- gestaltTempMemSupport EQU 4 ; temp memory support
- gestaltRealTempMemory EQU 5 ; temp memory handles are real
- gestaltTempMemTracked EQU 6 ; temporary memory handles are tracked
- gestaltIPCSupport EQU 7 ; IPC support is present
- gestaltSysDebuggerSupport EQU 8 ; system debugger support is present
-
- gestaltOSTable EQU 'ostt' ; OS trap table base
-
- gestaltProcClkSpeed EQU 'pclk' ; processor clock speed in hertz
-
- gestaltPCXAttr EQU 'pcxg' ; PC Exchange attributes
- gestaltPCXHas8and16BitFAT EQU 0 ; PC Exchange supports both 8 and 16 bit FATs
- gestaltPCXHasProDOS EQU 1 ; PC Exchange supports ProDOS
-
- gestaltLogicalPageSize EQU 'pgsz' ; logical page size
-
- gestaltPopupAttr EQU 'pop!' ; popup cdef attributes
- gestaltPopupPresent EQU 0
-
- gestaltPowerMgrAttr EQU 'powr' ; power manager attributes
- gestaltPMgrExists EQU 0
- gestaltPMgrCPUIdle EQU 1
- gestaltPMgrSCC EQU 2
- gestaltPMgrSound EQU 3
- gestaltPMgrDispatchExists EQU 4
- ;
- ; * PPC will return the combination of following bit fields.
- ; * e.g. gestaltPPCSupportsRealTime +gestaltPPCSupportsIncoming + gestaltPPCSupportsOutGoing
- ; * indicates PPC is cuurently is only supports real time delivery
- ; * and both incoming and outgoing network sessions are allowed.
- ; * By default local real time delivery is supported as long as PPCInit has been called.
- ;
-
- gestaltPPCToolboxAttr EQU 'ppc ' ; PPC toolbox attributes
- gestaltPPCToolboxPresent EQU $0000 ; PPC Toolbox is present Requires PPCInit to be called
- gestaltPPCSupportsRealTime EQU $1000 ; PPC Supports real-time delivery
- gestaltPPCSupportsIncoming EQU $0001 ; PPC will deny incoming network requests
- gestaltPPCSupportsOutGoing EQU $0002 ; PPC will deny outgoing network requests
-
- gestaltProcessorType EQU 'proc' ; processor type
- gestalt68000 EQU 1
- gestalt68010 EQU 2
- gestalt68020 EQU 3
- gestalt68030 EQU 4
- gestalt68040 EQU 5
-
- gestaltParityAttr EQU 'prty' ; parity attributes
- gestaltHasParityCapability EQU 0 ; has ability to check parity
- gestaltParityEnabled EQU 1 ; parity checking enabled
-
- gestaltQuickdrawVersion EQU 'qd ' ; quickdraw version
- gestaltOriginalQD EQU $0000 ; original 1-bit QD
- gestalt8BitQD EQU $0100 ; 8-bit color QD
- gestalt32BitQD EQU $0200 ; 32-bit color QD
- gestalt32BitQD11 EQU $0201 ; 32-bit color QDv1.1
- gestalt32BitQD12 EQU $0220 ; 32-bit color QDv1.2
- gestalt32BitQD13 EQU $0230 ; 32-bit color QDv1.3
-
- gestaltQuickdrawFeatures EQU 'qdrw' ; quickdraw features
- gestaltHasColor EQU 0 ; color quickdraw present
- gestaltHasDeepGWorlds EQU 1 ; GWorlds can be deeper than 1-bit
- gestaltHasDirectPixMaps EQU 2 ; PixMaps can be direct (16 or 32 bit)
- gestaltHasGrayishTextOr EQU 3 ; supports text mode grayishTextOr
- gestaltSupportsMirroring EQU 4 ; Supports video mirroring via the Display Manager.
-
- gestaltQuickTimeVersion EQU 'qtim' ; returns version of QuickTime
- gestaltQuickTime EQU 'qtim' ; gestaltQuickTime is old name for gestaltQuickTimeVersion
-
- gestaltQuickTimeConferencingInfo EQU 'qtci' ; returns pointer to QuickTime Conferencing information
-
- gestaltQuickTimeConferencing EQU 'mtlk' ; returns QuickTime Conferencing version
-
- gestaltQuickTimeFeatures EQU 'qtrs'
- gestaltPPCQuickTimeLibPresent EQU 0 ; PowerPC QuickTime glue library is present
-
- gestaltPhysicalRAMSize EQU 'ram ' ; physical RAM size
-
- gestaltRBVAddr EQU 'rbv ' ; RBV base address
-
- gestaltROMSize EQU 'rom ' ; rom size
-
- gestaltROMVersion EQU 'romv' ; rom version
-
- gestaltResourceMgrAttr EQU 'rsrc' ; Resource Mgr attributes
- gestaltPartialRsrcs EQU 0 ; True if partial resources exist
-
- gestaltRealtimeMgrAttr EQU 'rtmr' ; Realtime manager attributes
- gestaltRealtimeMgrPresent EQU 0 ; true if the Realtime manager is present
-
- gestaltSCCReadAddr EQU 'sccr' ; scc read base address
-
- gestaltSCCWriteAddr EQU 'sccw' ; scc read base address
-
- gestaltScrapMgrAttr EQU 'scra' ; Scrap Manager attributes
- gestaltScrapMgrTranslationAware EQU 0 ; True if scrap manager is translation aware
-
- gestaltScriptMgrVersion EQU 'scri' ; Script Manager version number
-
- gestaltScriptCount EQU 'scr#' ; number of active script systems
-
- gestaltSCSI EQU 'scsi' ; SCSI Manager attributes
- gestaltAsyncSCSI EQU 0 ; Supports Asynchronous SCSI
- gestaltAsyncSCSIINROM EQU 1 ; Async scsi is in ROM (available for booting)
- gestaltSCSISlotBoot EQU 2 ; ROM supports Slot-style PRAM for SCSI boots (PDM and later)
-
- gestaltControlStripAttr EQU 'sdev' ; Control Strip attributes
- gestaltControlStripExists EQU 0 ; Control Strip is installed
- gestaltControlStripVersionFixed EQU 1 ; Control Strip version Gestalt selector was fixed
- gestaltControlStripUserFont EQU 2 ; supports user-selectable font/size
- gestaltControlStripUserHotKey EQU 3 ; support user-selectable hot key to show/hide the window
-
- gestaltSerialAttr EQU 'ser ' ; Serial attributes
- gestaltHasGPIaToDCDa EQU 0 ; GPIa connected to DCDa
- gestaltHasGPIaToRTxCa EQU 1 ; GPIa connected to RTxCa clock input
- gestaltHasGPIbToDCDb EQU 2 ; GPIb connected to DCDb
-
- gestaltNuBusConnectors EQU 'sltc' ; bitmap of NuBus connectors
-
- gestaltSlotAttr EQU 'slot' ; slot attributes
- gestaltSlotMgrExists EQU 0 ; true is slot mgr exists
- gestaltNuBusPresent EQU 1 ; NuBus slots are present
- gestaltSESlotPresent EQU 2 ; SE PDS slot present
- gestaltSE30SlotPresent EQU 3 ; SE/30 slot present
- gestaltPortableSlotPresent EQU 4 ; Portable’s slot present
-
- gestaltFirstSlotNumber EQU 'slt1' ; returns first physical slot
-
- gestaltSoundAttr EQU 'snd ' ; sound attributes
- gestaltStereoCapability EQU 0 ; sound hardware has stereo capability
- gestaltStereoMixing EQU 1 ; stereo mixing on external speaker
- gestaltSoundIOMgrPresent EQU 3 ; The Sound I/O Manager is present
- gestaltBuiltInSoundInput EQU 4 ; built-in Sound Input hardware is present
- gestaltHasSoundInputDevice EQU 5 ; Sound Input device available
- gestaltPlayAndRecord EQU 6 ; built-in hardware can play and record simultaneously
- gestalt16BitSoundIO EQU 7 ; sound hardware can play and record 16-bit samples
- gestaltStereoInput EQU 8 ; sound hardware can record stereo
- gestaltLineLevelInput EQU 9 ; sound input port requires line level
- ; the following bits are not defined prior to Sound Mgr 3.0
- gestaltSndPlayDoubleBuffer EQU 10 ; SndPlayDoubleBuffer available, set by Sound Mgr 3.0 and later
- gestaltMultiChannels EQU 11 ; multiple channel support, set by Sound Mgr 3.0 and later
- gestalt16BitAudioSupport EQU 12 ; 16 bit audio data supported, set by Sound Mgr 3.0 and later
-
- gestaltSoftwareVendorCode EQU 'srad' ; Returns system software vendor information
- gestaltSoftwareVendorApple EQU 'Appl' ; System software sold by Apple
- gestaltSoftwareVendorLicensee EQU 'Lcns' ; System software sold by licensee
-
- gestaltStandardFileAttr EQU 'stdf' ; Standard File attributes
- gestaltStandardFile58 EQU 0 ; True if selectors 5-8 (StandardPutFile-CustomGetFile) are supported
- gestaltStandardFileTranslationAware EQU 1 ; True if standard file is translation manager aware
- gestaltStandardFileHasColorIcons EQU 2 ; True if standard file has 16x16 color icons
- gestaltStandardFileUseGenericIcons EQU 3 ; Standard file LDEF to use only the system generic icons if true
- gestaltStandardFileHasDynamicVolumeAllocation EQU 4 ; True if standard file supports more than 20 volumes
-
- gestaltSysArchitecture EQU 'sysa' ; Native System Architecture
- gestalt68k EQU 1 ; Motorola MC68k architecture
- gestaltPowerPC EQU 2 ; IBM PowerPC architecture
-
- gestaltSystemUpdateVersion EQU 'sysu' ; System Update version
-
- gestaltSystemVersion EQU 'sysv' ; system version
-
- gestaltTSMgrVersion EQU 'tsmv' ; Text Services Mgr version, if present
- gestaltTSMgr2 EQU $0200
-
- gestaltTSMgrAttr EQU 'tsma' ; Text Services Mgr attributes, if present
- gestaltTSMDisplayMgrAwareBit EQU 0 ; TSM knows about display manager
- gestaltTSMdoesTSMTEBit EQU 1 ; TSM has integrated TSMTE
-
- gestaltTSMTEVersion EQU 'tmTV'
- gestaltTSMTE1 EQU $0100
- gestaltTSMTE2 EQU $0200
-
- gestaltTSMTEAttr EQU 'tmTE'
- gestaltTSMTEPresent EQU 0
- gestaltTSMTE EQU 0 ; gestaltTSMTE is old name for gestaltTSMTEPresent
-
- gestaltTextEditVersion EQU 'te ' ; TextEdit version number
- gestaltTE1 EQU 1 ; TextEdit in MacIIci ROM
- gestaltTE2 EQU 2 ; TextEdit with 6.0.4 Script Systems on MacIIci (Script bug fixes for MacIIci)
- gestaltTE3 EQU 3 ; TextEdit with 6.0.4 Script Systems all but MacIIci
- gestaltTE4 EQU 4 ; TextEdit in System 7.0
- gestaltTE5 EQU 5 ; TextWidthHook available in TextEdit
- gestaltTE6 EQU 6 ; TextEdit in System 8.0
-
- gestaltTEAttr EQU 'teat' ; TextEdit attributes
- gestaltTEHasGetHiliteRgn EQU 0 ; TextEdit has TEGetHiliteRgn
- gestaltTESupportsInlineInput EQU 1 ; TextEdit does Inline Input
- gestaltTESupportsTextObjects EQU 2 ; TextEdit does Text Objects
-
- gestaltTeleMgrAttr EQU 'tele' ; Telephone manager attributes
- gestaltTeleMgrPresent EQU 0
- gestaltTeleMgrPowerPCSupport EQU 1
- gestaltTeleMgrSoundStreams EQU 2
- gestaltTeleMgrAutoAnswer EQU 3
- gestaltTeleMgrIndHandset EQU 4
- gestaltTeleMgrSilenceDetect EQU 5
- gestaltTeleMgrNewTELNewSupport EQU 6
-
- gestaltTermMgrAttr EQU 'term' ; terminal mgr attributes
- gestaltTermMgrPresent EQU 0
- gestaltTermMgrErrorString EQU 2
-
- gestaltTimeMgrVersion EQU 'tmgr' ; time mgr version
- gestaltStandardTimeMgr EQU 1 ; standard time mgr is present
- gestaltRevisedTimeMgr EQU 2 ; revised time mgr is present
- gestaltExtendedTimeMgr EQU 3 ; extended time mgr is present
-
- gestaltSpeechAttr EQU 'ttsc' ; Speech Manager attributes
- gestaltSpeechMgrPresent EQU 0 ; bit set indicates that Speech Manager exists
- gestaltSpeechHasPPCGlue EQU 1 ; bit set indicates that native PPC glue for Speech Manager API exists
-
- gestaltToolboxTable EQU 'tbtt' ; OS trap table base
-
- gestaltThreadMgrAttr EQU 'thds' ; Thread Manager attributes
- gestaltThreadMgrPresent EQU 0 ; bit true if Thread Mgr is present
- gestaltSpecificMatchSupport EQU 1 ; bit true if Thread Mgr supports exact match creation option
- gestaltThreadsLibraryPresent EQU 2 ; bit true if Thread Mgr shared library is present
-
- gestaltTVAttr EQU 'tv ' ; TV version
- gestaltHasTVTuner EQU 0 ; supports Philips FL1236F video tuner
- gestaltHasSoundFader EQU 1 ; supports Philips TEA6330 Sound Fader chip
- gestaltHasHWClosedCaptioning EQU 2 ; supports Philips SAA5252 Closed Captioning
- gestaltHasIRRemote EQU 3 ; supports CyclopsII Infra Red Remote control
- gestaltHasVidDecoderScaler EQU 4 ; supports Philips SAA7194 Video Decoder/Scaler
- gestaltHasStereoDecoder EQU 5 ; supports Sony SBX1637A-01 stereo decoder
- gestaltHasSerialFader EQU 6 ; has fader audio in serial with system audio
- gestaltHasFMTuner EQU 7 ; has FM Tuner from donnybrook card
-
- gestaltVersion EQU 'vers' ; gestalt version
- gestaltValueImplementedVers EQU 5 ; version of gestalt where gestaltValue is implemented.
-
- gestaltVIA1Addr EQU 'via1' ; via 1 base address
-
- gestaltVIA2Addr EQU 'via2' ; via 2 base address
-
- gestaltVMAttr EQU 'vm ' ; virtual memory attributes
- gestaltVMPresent EQU 0 ; true if virtual memory is present
-
- gestaltTranslationAttr EQU 'xlat' ; Translation Manager attributes
- gestaltTranslationMgrExists EQU 0 ; True if translation manager exists
- gestaltTranslationMgrHintOrder EQU 1 ; True if hint order reversal in effect
- gestaltTranslationPPCAvail EQU 2
- gestaltTranslationGetPathAPIAvail EQU 3
-
- gestaltExtToolboxTable EQU 'xttt' ; Extended Toolbox trap table base
- ENDIF ; __GESTALT__
-
-